#ifndef _RpcApplication_H
#define _RpcApplication_H
#include "RpcConfig.h"
#include "RpcChannel.h" 
#include "RpcController.h"
#include <mutex>

// Rpc基础类，负责框架的一些初始化操作
class RpcApplication
{
public:
    static void Init(int argc, char **argv);
    static RpcApplication& GetInstance();
    static void DeleteInstance();
    static RpcConfig& GetConfig();
private:
    static RpcConfig m_config;
    static RpcApplication* m_application; // 全局唯一单例访问对象
    static std::mutex m_mutex;
    RpcApplication() {}
    ~RpcApplication() {}
    RpcApplication(const RpcApplication&) = delete;
    RpcApplication(RpcApplication&&) = delete;
};
#endif